<%@ page language="java" contentType="text/xml; charset=UTF-8"
    pageEncoding="UTF-8"%>

<jsp:useBean id="bean" scope="request" class="br.com.rapidrest.demo.web.engine.phonebook.EditPhoneEntry" /> 
<engine xmlns:hl="http://www.holyavenger.org/holyavenger/1.0">
	<action id="content">
		<h1><%=bean.getMessages().get("title")%></h1>
		
		<form action="../../EditPhoneEntry.save/$page.phoneBook.id/$page.phoneEntry.id" method="post">
			<fieldset>
				<legend><%=bean.getMessages().get("editPhoneEntry")%></legend>
				
				<label for="entryName"><%=bean.getMessages().get("name")%></label>
				<input id="entryName" name="\${entryName}" type="text" value="<%=bean.getPhoneEntry().getName()%>" />
				
				<label for="entryPhone"><%=bean.getMessages().get("phone")%></label>
				<input id="entryPhone" name="\${entryPhone}" type="text" value="<%=bean.getPhoneEntry().getPhone()%>" />
				
				<input id="save" value="<%=bean.getMessages().get("save")%>" type="button"
					hl:onclick="engine/phonebook/EditPhoneEntry.save/<%=bean.getPhoneBook().getId()%>/<%=bean.getPhoneEntry().getId()%>" />
			</fieldset>
		</form>
		
		<a href="#engine/phonebook/EditPhoneBook/<%=bean.getPhoneBook().getId()%>" title="<%=bean.getMessages().get("back")%>">
			<%=bean.getMessages().get("back")%>
		</a>
	</action>
</engine>